#include<pthread.h>
#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
void* work(void* arg)
{
    char* buffer=(char*)malloc(100);
    printf("子线程:申请了内存...\n");
    sleep(2);
    free(buffer);
    printf("子线程:释放了内存...\n");
    return NULL;
}
int main()
{
    pthread_t tid;
    pthread_create(&tid,NULL,work,NULL);
    printf("主线程:不等待子线程结束...\n");
    return 0;
}